import { request } from "@/utils/service"
import { GetTableResponseData, GetUserParam, AddUserForm } from "./types/UserManage"

//获取系统用户列表 分页 接口
export function getUserListApi(params: GetUserParam) {
  return request<GetTableResponseData>({
    url: "/user_list",
    method: "get",
    params
  })
}
//新增用户api
export function createUserApi(data: AddUserForm) {
  return request<ApiResponseData<string>>({
    url: "/create_user",
    method: "post",
    data
  })
}

//更新用户api
export function updateUserApi(data: AddUserForm) {
  return request<ApiResponseData<string>>({
    url: "/update_user",
    method: "post",
    data
  })
}
